﻿<%@ Page Language="C#" MasterPageFile="~/includes/main.master" AutoEventWireup="true"
    CodeFile="UserFeedBack.aspx.cs" ValidateRequest="false" Inherits="User_UserFeedBack"
    Async="true" Title="Car Insurance Feedback - ComparExpress" %>

<%@ Register Src="../controls/usrCompanyLogoByServices.ascx" TagName="usrCompanyLogoByServices"
    TagPrefix="uc1" %>
<%@ Register Src="../controls/usrCompanyBigLogoByServices.ascx" TagName="usrCompanyBigLogoByServices"
    TagPrefix="uc12" %>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">

    <script src="../includes/ValidationError.js" type="text/javascript"></script>

    <script src="../includes/ValidationEffect.js" type="text/javascript"></script>

    <div class="elements_inner_wrapper">
        <div class="rightcol">
            <div class="content_right">
                <div class="tip">
                    <div class="head">
                    </div>
                    <div class="body" id="spanPartnerLogo">
                        <h1>
                            Our Merchants</h1>
                        <uc12:usrCompanyBigLogoByServices LogoLimitCount="8" CompanyProviderTypeId="0" ID="usrCompanyLogoByServices1"
                            runat="server" />
                    </div>
                    <div class="foot">
                    </div>
                </div>
            </div>
        </div>
        <div id="contentBody">
            <h1>
                Send Us Your Feedback</h1>
            <div class="section">
                <fieldset>
                    <div id="divFeedback" runat="server">
                        <div class="row">
                            <asp:ValidationSummary ID="vsUserFeedBack" runat="server" ValidationGroup="feedback"
                                ShowSummary="True" CssClass="errorSummary" HeaderText="Oops please complete the form">
                            </asp:ValidationSummary>
                        </div>
                        <%--<div class="row">
                            <label>
                                Feedback Title</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:Label ID="lblFeedBackTitle" runat="server" Text="CompareXpress Feedback "></asp:Label>
                                </span>
                            </div>
                        </div>--%>
                        <div class="row">
                            <label for="fnam" class="mand_red">
                                What you feel?&nbsp;</label>
                            <div class="field">
                                <table width="100%" cellpadding="2" cellspacing="2">
                                    <tr>
                                        <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnVeryUseful" runat="server" ToolTip="Very Useful" ImageUrl="~/images/icon/emotion/happy-icon.png"
                                                 Width="75" Height="75" OnClientClick="return ChangeImage('EV')" />
                                        </td>
                                        <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnGood" runat="server" ToolTip="Good" ImageUrl="~/images/icon/emotion/smile-icon.png"
                                                 Width="75" Height="75" OnClientClick="return ChangeImage('EG')" />
                                        </td>
                                        <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnOk" runat="server" ToolTip="OK" ImageUrl="~/images/icon/emotion/ok-icon.png"
                                                Width="75" Height="75" OnClientClick="return ChangeImage('EO')" />
                                        </td>
                                        <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnSad" runat="server" ToolTip="Sad" ImageUrl="~/images/icon/emotion/sad-icon.png" 
                                                Width="75" Height="75" OnClientClick="return ChangeImage('ES')" />
                                        </td>
                                        <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnAngry" runat="server" ToolTip="Angry" ImageUrl="~/images/icon/emotion/angry-icon.png"
                                                 Width="75" Height="75" OnClientClick="return ChangeImage('EA')" />
                                        </td>
                                    </tr>                                    
                                </table>
                             </div>
                             <div style="display:none;">
                                 <asp:TextBox ID="txtEmotionType" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvEmotionType" ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        runat="server" ErrorMessage="Please Select What you feel." ControlToValidate="txtEmotionType"></asp:RequiredFieldValidator>
                             </div>
                        </div>                        
                        <div class="row">
                            <label for="fnam" class="mand_red">
                                Feedback Type&nbsp;</label>
                            <div class="field">
                                <table width="100%" cellpadding="2" cellspacing="2">
                                    <tr>
                                         <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnSuggestion" runat="server" ToolTip="Suggestion" ImageUrl="~/images/icon/emotion/button_suggestion.png"
                                                 OnClientClick="return ChangeImage('BS')" />
                                        </td>
                                         <td style="width: 20%" align="center">
                                            <asp:ImageButton ID="ibtnCompliment" runat="server" ToolTip="Compliment" ImageUrl="~/images/icon/emotion/button_compliment.png"
                                                 OnClientClick="return ChangeImage('BC')" />
                                        </td>
                                        <td colspan="3">
                                            <asp:ImageButton ID="ibtnBug" runat="server" ToolTip="Bug" ImageUrl="~/images/icon/emotion/button_bug.png"
                                                OnClientClick="return ChangeImage('BB')" />                                                
                                        </td>
                                    </tr>
                                </table>
                             </div>
                             <div style="display:none;">
                                 <asp:TextBox ID="txtFeedbackType" runat="server"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvFeedbackType" ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        runat="server" ErrorMessage="Please Select Feedback Type." ControlToValidate="txtFeedbackType"></asp:RequiredFieldValidator>
                             </div>
                        </div>
                        <div class="row">
                            <label for="fnam" class="mand_red">
                                Your Name</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:TextBox ID="txtName" MaxLength="50" class="text" runat="server" Width="200px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvName" runat="server" validationErrorCssClass="validationError"
                                        ValidationGroup="feedback" ErrorMessage="" Text="" ControlToValidate="txtName"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="revName" runat="server" ValidationGroup="feedback"
                                        ValidationExpression="^[a-zA-Z''-'\s]{1,50}$" validationErrorCssClass="validationError"
                                        ControlToValidate="txtName" ErrorMessage=""></asp:RegularExpressionValidator></span></div>
                            <div class="clear">
                            </div>
                        </div>
                        <div class="row">
                            <label class="mand_red">
                                Your Email</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:TextBox ID="txtEmail" runat="server" Width="250px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        ID="rfvEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage=""></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        ID="revEmail" runat="server" ControlToValidate="txtEmail" ErrorMessage="" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                </span>
                            </div>
                        </div>
                        <%--<div class="row">
                            <label class="mand_red">
                                Form Type</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:DropDownList ID="ddlFormName" runat="server">
                                        <asp:ListItem Value="-1">Select</asp:ListItem>
                                        <asp:ListItem>Login And Register</asp:ListItem>
                                        <asp:ListItem>Car Insurance</asp:ListItem>
                                        <asp:ListItem>Personal Accident</asp:ListItem>
                                        <asp:ListItem>Travel Insurance</asp:ListItem>
                                        <asp:ListItem>Cheap Flights</asp:ListItem>
                                        <asp:ListItem>Others</asp:ListItem>
                                        <asp:ListItem>All</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        ID="rfvFormName" runat="server" ControlToValidate="ddlFormName" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator>
                                </span>
                            </div>
                        </div>
                        <div class="row">
                            <label class="mand_red">
                                Feedback Type</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:DropDownList ID="ddlFeedBackType" runat="server">
                                        <asp:ListItem Value="-1" Selected="True">Select</asp:ListItem>
                                        <asp:ListItem>FYI</asp:ListItem>
                                        <asp:ListItem>Prefer</asp:ListItem>
                                        <asp:ListItem>Don&#39;t like</asp:ListItem>
                                        <asp:ListItem>Get error on page</asp:ListItem>
                                        <asp:ListItem>Need to edit</asp:ListItem>
                                        <asp:ListItem>Others</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        ID="rfvFeedBackType" runat="server" ControlToValidate="ddlFeedBackType" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator>
                                </span>
                            </div>
                        </div>--%>
                        <div class="row">
                            <label class="mand_red">
                                Your Feedback</label>
                            <div class="field">
                                <span class="indicator">
                                    <asp:TextBox ID="txtFeedBack" runat="server" Columns="61" MaxLength="500" Rows="7"
                                        TextMode="MultiLine"></asp:TextBox>
                                    <asp:RequiredFieldValidator ValidationGroup="feedback" validationErrorCssClass="validationError"
                                        ID="rfvFeedback" runat="server" ErrorMessage="" ControlToValidate="txtFeedBack"></asp:RequiredFieldValidator>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div id="divThankYou" visible="false" runat="server">
                        <asp:Label runat="server" Font-Size="Large" Font-Bold="true" ForeColor="Green" ID="lblThankYou">Thank you for your feedback. <br />CompareXpress Support will revert back to you within 2 or 3 working days.</asp:Label>
                    </div>
                    <div class="row" id="divButton" runat="server">
                        <label>
                        </label>
                        <div class="field">
                            <span class="indicator">
                                <br />
                                <%--<asp:ImageButton ID="btnSendFeedBack" ValidationGroup="feedback" OnClientClick="LoadValidationErrorCss()"
                            runat="server" Text="Send" OnClick="btnSendFeedBack_Click" ImageUrl="../images/buttons/submit_but.gif"
                            class="img_align_right" />--%>
                                <asp:Button runat="server" ID="btnSendFeedBack" ValidationGroup="feedback" CssClass="button_submit img_align_right"
                                    onmousedown="this.className = 'button_submit_mousedown img_align_right';" onmouseup="this.className = 'button_submit img_align_right';"
                                    onmouseout="this.className = 'button_submit img_align_right';" OnClientClick="LoadValidationErrorCss(); if (Page_ClientValidate('feedback')){this.removeAttribute('onmouseout'); this.removeAttribute('onmouseup'); this.className='button_processing img_align_right';}"
                                    OnClick="btnSendFeedBack_Click" />
                            </span>
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </div>
    <script type="text/javascript">
        function ChangeImage(btnName) {

            var txtET = document.getElementById('<%=txtEmotionType.ClientID%>');
            var txtFT = document.getElementById('<%=txtFeedbackType.ClientID%>');

            var imgBS = document.getElementById('<%=ibtnSuggestion.ClientID%>');
            var imgBC = document.getElementById('<%=ibtnCompliment.ClientID%>');
            var imgBB = document.getElementById('<%=ibtnBug.ClientID%>');

            var imgEV = document.getElementById('<%=ibtnVeryUseful.ClientID%>');
            var imgEG = document.getElementById('<%=ibtnGood.ClientID%>');
            var imgEO = document.getElementById('<%=ibtnOk.ClientID%>');
            var imgES = document.getElementById('<%=ibtnSad.ClientID%>');
            var imgEA = document.getElementById('<%=ibtnAngry.ClientID%>');

            if (btnName == "BS") {
                txtFT.value = "1";
                imgBS.src = '/images/icon/emotion/button_suggestion_s.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';
            }
            else if (btnName == "BC") {
                txtFT.value = "2";
                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment_s.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';
            }
            else if (btnName == "BB") {
                txtFT.value = "3";
                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug_s.png';
            }
            else if (btnName == "EV") {
                txtET.value = "1";
                imgEV.src = '/images/icon/emotion/happy-icon_s.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EG") {
                txtET.value = "2";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon_s.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EO") {
                txtET.value = "3";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon_s.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "ES") {
                txtET.value = "4";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon_s.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            else if (btnName == "EA") {
                txtET.value = "5";
                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon_s.png';
            }
            else {
                txtET.value = "";
                txtFT.value = "";

                imgBS.src = '/images/icon/emotion/button_suggestion.png';
                imgBC.src = '/images/icon/emotion/button_compliment.png';
                imgBB.src = '/images/icon/emotion/button_bug.png';

                imgEV.src = '/images/icon/emotion/happy-icon.png';
                imgEG.src = '/images/icon/emotion/smile-icon.png';
                imgEO.src = '/images/icon/emotion/ok-icon.png';
                imgES.src = '/images/icon/emotion/sad-icon.png';
                imgEA.src = '/images/icon/emotion/angry-icon.png';
            }
            return false;
        } 
    </script>
</asp:Content>
